﻿using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using SQLite;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Medicine.Models
{
    [Serializable, Table("AppSet")]
    public class AppSet : BaseModel
    {
        #region 服务器信息
        /// <summary>
        /// 服务器地址
        /// </summary>
        [Column("serverip")]
        public string ServerIp { get; set; }

        /// <summary>
        /// 端口
        /// </summary>
        [Column("serverport")]
        public string ServerPort { get; set; }

        /// <summary>
        /// 服务器更新版本号文件地址
        /// </summary>
        [Column("serverupdatefilepath")]
        public string ServerUpdateFilePath { get; set; }

        /// <summary>
        /// 服务器更新文件地址
        /// </summary>
        [Column("serverupdatedatapath")]
        public string ServerUpdateDataPath { get; set; }
        #endregion

        #region 程序配置
        /// <summary>
        /// 药品临近天数
        /// </summary>
        [Column("medicineoverday")]
        public string MedicineOverDay { get; set; }
        #endregion


        public void InitDefaultData()
        {
            this.ServerIp = "http://114.55.145.41";
            this.ServerPort = "8888";
            this.ServerUpdateFilePath = "/json/data.json";
            this.ServerUpdateDataPath = "/static/102.apk";
            this.MedicineOverDay = "3";
        }
    }
}